package authentication

import (
	"MoSkeleton/framework/mo_gin"
	"github.com/gin-gonic/gin"
)

/*
可配置的开放的访问接口
*/

func doPublicAuth(c *gin.Context) AuthFlowContinue {
	publicUrls := mo_gin.CommonGin.AuthGroup.PublicUrls
	if len(publicUrls) == 0 {
		return false
	}
	ok := ifMatchPath(c.Request.RequestURI, publicUrls)
	if ok {
		c.Next()
		return false
	}
	return true
}
